//******************************************************
// Navbar
//******************************************************

// Variables
//
@font-size-base:          14px;
//** Unit-less `line-height` for use in components like buttons.
@line-height-base:        1.428571429; // 20/14
//** Computed "line-height" (`font-size` * `line-height`) for use with `margin`, `padding`, etc.
@line-height-computed:    floor((@font-size-base * @line-height-base)); // ~20px

@zindex-navbar:            1000;
@zindex-dropdown:          1000;
@zindex-popover:           1060;
@zindex-tooltip:           1070;
@zindex-navbar-fixed:      1030;
@zindex-modal:             1040;

// Basics of a navbar
@navbar-height:                    50px;
//@navbar-margin-bottom:             @line-height-computed;
@navbar-border-radius:             8px;
@navbar-padding-horizontal:        floor((@grid-gutter-width / 2));
@navbar-padding-vertical:          ((@navbar-height - @line-height-computed) / 2);
@navbar-default-padding-vertical:  8px;
@navbar-collapse-max-height:       340px;

// Colors
//@navbar-default-color:             #777;
@navbar-default-bg:                #419131;
@navbar-default-border:            darken(@navbar-default-bg, 10%); //#207d0c;

// Navbar links
@navbar-link-padding-horizontal:           14px;
@navbar-link-padding-vertical:						 7px;
@navbar-default-link-color:                #fff;
@navbar-default-link-hover-color:          #fff;
@navbar-default-link-hover-bg:             #207d0c;
@navbar-default-link-active-color:         #555;
@navbar-default-link-active-bg:            darken(@navbar-default-bg, 6.5%);
@navbar-default-link-disabled-color:       #ccc;
@navbar-default-link-disabled-bg:          transparent;

// Navbar brand label
@navbar-default-brand-padding-horizontal:    5px;
@navbar-default-brand-padding-vertical:      5px;
//@navbar-default-brand-color:               @navbar-default-link-color;
//@navbar-default-brand-hover-color:         darken(@navbar-default-brand-color, 10%);
//@navbar-default-brand-hover-bg:            transparent;

// Navbar toggle
//@navbar-default-toggle-hover-bg:           #ddd;
//@navbar-default-toggle-icon-bar-bg:        #888;
//@navbar-default-toggle-border-color:       #ddd;


// Base class
.navbar {
	position: relative;
  max-height: @navbar-height; // Ensure a navbar always shows (e.g., without a .navbar-brand in collapsed mode)
  //margin-bottom: @navbar-margin-bottom;
  border-bottom: 1px solid transparent;

  // Prevent floats from breaking the navbar
  &:extend(.clearfix all);

  @media (min-width: @grid-collapse) {
  	padding: @navbar-default-padding-vertical 0;
  }
}

// Navbar Header
.navbar-header {
  &:extend(.clearfix all);

  @media (min-width: @grid-collapse) {
    float: left;
  }
}

.navbar-collapse {
  overflow-x: visible;
  padding-right: @navbar-padding-horizontal;
  padding-left:  @navbar-padding-horizontal;

  &:extend(.clearfix all);
  -webkit-overflow-scrolling: touch;

  &.in {
    overflow-y: auto;
  }

  @media (min-width: @grid-collapse) {
    width: auto;
    border-top: 0;

    &.collapse {
      display: block !important;
      visibility: visible !important;
      height: auto !important;
      padding-bottom: 0; // Override default setting
      overflow: visible !important;
    }

    &.in {
      overflow-y: visible;
    }

    // Undo the collapse side padding for navbars with containers to ensure
    // alignment of right-aligned contents.
    .navbar-fixed-top &,
    .navbar-fixed-bottom & {
      padding-left: 0;
      padding-right: 0;
    }
  }
}

.navbar-fixed-top,
.navbar-fixed-bottom {
  .navbar-collapse {
    max-height: @navbar-collapse-max-height;

    @media (max-device-width: @screen-xs-min) and (orientation: landscape) {
      max-height: 200px;
    }
  }
}

.container {
  > .navbar-header,
  > .navbar-collapse {
    margin-right: -@navbar-padding-horizontal;
    margin-left:  -@navbar-padding-horizontal;

    @media (min-width: @grid-collapse) {
      margin-right: 0;
      margin-left:  0;
    }
  }
}

// Fix the top/bottom navbars when screen real estate supports it
.navbar-fixed-top,
.navbar-fixed-bottom {
  position: fixed;
  right: 0;
  left: 0;
  z-index: @zindex-navbar-fixed;
}
.navbar-fixed-top {
  top: 0;
  border-width: 0 0 1px;
}
.navbar-fixed-bottom {
  bottom: 0;
  margin-bottom: 0; // override .navbar defaults
  border-width: 1px 0 0;
}

// Brand/project name

.navbar-brand {
  float: left;
  padding: 0;
  height: (@navbar-height - (@navbar-default-padding-vertical * 2));

  &:hover,
  &:focus {
    text-decoration: none;
  }

  > img {
    display: block;
    margin: auto auto;
    width: auto;
    height: 100%;
  }

  @media (min-width: @grid-collapse) {
    .navbar > .container & {
      margin-left: -@navbar-padding-horizontal;
    }
  }
}

.navbar-body {
	margin: (@navbar-padding-vertical / 2) -@navbar-padding-horizontal;
  padding-left: 0; // Override default ul/ol
  list-style: none;
  &:extend(.clearfix all);

  > li {
    position: relative;
    display: block;
  }

  > li > a {
    position: relative;
    display: block;
    padding: @navbar-link-padding-vertical @navbar-link-padding-horizontal;
    line-height: @line-height-computed;
  }

  // Uncollapse the nav
  @media (min-width: @grid-collapse) {
  	float: left;
    margin: 0;

    > li {
      float: left;
      > a {
        padding: @navbar-link-padding-vertical @navbar-link-padding-horizontal;
        margin: 0 3px;
      }
    }
  }

  // Prevent IE8 from misplacing imgs
  //
  // See https://github.com/h5bp/html5-boilerplate/issues/984#issuecomment-3985989
  > li > a > img {
    max-width: none;
  }
}

.navbar-body > li > a {
  text-shadow: 0 -1px rgba(0, 0, 0, 50%);
}

@media (min-width: @grid-collapse) {
  .navbar-left  { .pull-left(); }
  .navbar-right {
    .pull-right();
    margin-right: -@navbar-padding-horizontal;

    ~ .navbar-right {
      margin-right: 0;
    }
  }
}

.navbar-theme {
	background-color: @navbar-default-bg;
  border-color: @navbar-default-border;
  box-shadow: 0 2px 2px -2px rgba(0, 0, 0, 52%);

	.navbar-body {
    > li > a {
      color: @navbar-default-link-color;
      border-radius: @navbar-border-radius;
      transition: background-color .2s ease-in-out;

      &:hover,
      &:focus {
        color: @navbar-default-link-hover-color;
        background-color: @navbar-default-link-hover-bg;
      }
      &:active {
      	color: @navbar-default-link-active-color;
        background-color: @navbar-default-link-active-bg;
      }
    }
    > .active > a {
      &,
      &:hover,
      &:focus {
        color: @navbar-default-link-active-color;
        background-color: @navbar-default-link-active-bg;
      }
    }
    > .disabled > a {
      &,
      &:hover,
      &:focus {
        color: @navbar-default-link-disabled-color;
        background-color: @navbar-default-link-disabled-bg;
      }
    }
  }

	.navbar-collapse,
  .navbar-form {
    border-color: @navbar-default-border;
  }
}





